package com.data
{
	import com.views.IGraphElement;
	import mx.collections.ArrayCollection;
	
	/**
	 * Klasse für Datenmodel einer Verbindung
	 * 
	 */
	public class ConnectionDAO implements IGraphElementDAO
	{
		/**
		* Text der Verbindung
		*/
		private var _text:String;
		/**
		* Element von dem die Verbindung ausgeht
		*/
		private var _initiator:String;
		/**
		* Element in dem die Verbindung endet
		*/
		private var _target:String;
		
		private static var _uid:int = 0;
		
		private var _dataId:String;
		
		/**
		 * Konstruktor
		 * @param initiator Ausgangselement
		 * @param target Eingangselement
		 * @param text Text der Verbindung
		 * 
		 */
		public function ConnectionDAO(
			pInitiatorDataId:String,
			pTargetDataId:String,
			text:String = "")
		{
			_initiator = pInitiatorDataId;
			_target = pTargetDataId;
			_text = text;
			_uid++;
			_dataId = "c"+_uid;
		}
		
		/**
		 * Ausgangselement der Verbindung
		 * @return 
		 * 
		 */
		public function get initiatorDataId():String
		{
			return _initiator;
		}
		
		/**
		 * Endelement der Verbindung
		 * @return 
		 * 
		 */
		public function get targetDataId():String
		{
			return _target;
		}
		
		/**
		 * Text der Verbindung
		 * @param value
		 * 
		 */
		public function set text(value:String):void
		{
			_text = value;
		}
		public function get text():String
		{
			return _text;
		}
		
		/**
		 * Eindeutiger Identifizierer
		 * @return 
		 * 
		 */
		public function get dataId():String
		{
			return _dataId;
		}
		
		public function set creator(value:String):void
		{
			
		}
		public function get creator():String
		{
			return "";
		}
		
		public function set message(value:String):void
		{
			
		}
		public function get message():String
		{
			return "";
		}
		
		/**
		 * Hinzufügen eines parents
		 * @param obj Activity oder Decision Objekt
		 * 
		 */
		public function addPrev(uid:String):void
		{
			
		}
		
		/**
		 * Entfernen eines parents
		 * @param obj Activity oder Decision Objekt
		 * 
		 */
		public function removePrev(uid:String):void
		{
			
		}
		
		/**
		 * Hinzufügen eines child
		 * @param obj Activity oder Decision Objekt
		 * 
		 */
		public function addPost(uid:String):void
		{
			
		}
		
		/**
		 * Entfernen eines child
		 * @param obj Activity oder Decision Objekt
		 * 
		 */
		public function removePost(uid:String):void
		{
			
		}
		
		public function get prevList():Object
		{
			return null;
		}
		
		public function get postList():Object
		{
			return null;
		}
		
		
		public function set fullAccessList(value:ArrayCollection):void
		{
			
		}
		public function get fullAccessList():ArrayCollection
		{
			return null;
		}
		
		public function set restrictedAccessList(value:ArrayCollection):void
		{
			
		}
		public function get restrictedAccessList():ArrayCollection
		{
			return null;
		}
		
		public function set noAccessList(value:ArrayCollection):void
		{
			
		}
		public function get noAccessList():ArrayCollection
		{
			return null;
		}
		
		public function set decisionFunction(value:String):void
		{
			
		}
		public function get decisionFunction():String
		{
			return null;
		}
		
		
	}
}